<?php


namespace app\api\controller;


use think\Controller;
use think\Db;

class Parking extends Controller
{
    public function getParkingIdByAppId(){
        $appid=request()->get("appId");
        $res=Db::table("parkinglotinfo")->where("wechat_appid",$appid)
            ->field("parkingNo")
            ->find();
        if(!empty($res)){
            return json(["code"=>0,'data' => $res]);
        }else{
            return json(["code"=>500,'msg' => "车场信息不存在"]);
        }
    }
}